<template>
	<view class="body">
		<!-- 列表为空-->
		<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png" v-if="goodsList.length==0"></u-empty>
		<view style="background-color: #f6f6f6; padding: 15rpx;" v-if="goodsList.length > 0">
			<view class="goods_list">
				<view class="goods_item" v-for="item in goodsList" :key="item.id">	
					<view>
						<image :src="item.imgUrl"></image>
					</view>
					<view class="message">
						<view>{{item.goodsName}}</view>
						<view>价格:{{item.price}}</view>
						<view>库存:{{item.number}}</view>
						<view>已售:{{item.sold}}</view>
					</view>
					<!-- <view>
						<view class="downButton">
							<image src="../../static/down.png"></image>
							<view>下架</view>
						</view>
						<view class="editButton">
							<u-icon name="edit-pen-fill" color="blue" size="25"></u-icon>
						</view>
					</view> -->
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:['goodsList'],
		data(){
			return {
			}
		}
	}
</script>

<style scoped lang="scss">
	.goods_item {
		border-radius: 10px;
		margin: 10rpx;
		width: 700rpx;
		height: 230rpx;
		background-color: #ffffff;
		display: flex;

		image {
			margin: 5rpx;
			width: 200rpx;
			height: 200rpx;
			border-radius: 60px;
		}

		.message {
			margin: 5rpx;
			width: 600rpx;
			font-size: 30rpx;
			color: #444;
		}

		.downButton {
			margin-bottom: 20rpx;
			image {
				margin-right: 20rpx;
				width: 50rpx;
				height: 45rpx;
			}

			view {
				color: #888;
				margin-left: 10rpx;
				font-size: 20rpx;
			}
		}
	}
</style>
